package com.ktjy.controller;


import com.ktjy.pojo.vo.R;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;


//组合注解
//@RestController
@Controller
@ResponseBody
@RequestMapping("/userrest")
public class UserRestController {

    //@ResponseBody
    @GetMapping("/{id}/{name}/user")
    //public R findByuserId(String id) {    //? 表单
    //public R findByuserId(@RequestParam String id) {    //? 表单
    //public R findByuserId(@RequestBody String id) {    //body json
    public R findByuserId(@PathVariable("id") String id, @PathVariable("name") String name) {
        System.out.println(id);
        return null;
    }

    @DeleteMapping("/{id}/user/")
    public R delByuserId(@PathVariable("id") String id) {
        System.out.println(id);
        return null;
    }
}
